<template>
  <div>
    <span>{{ parseFloat(value).toFixed(precision) }}</span>
    <el-tooltip v-if="errorSign" class="right" effect="dark" :content="message" placement="top">
      <div>
        <i class="el-icon-warning" style="color:red;" />
      </div>
    </el-tooltip>
  </div>
</template>

<script>
export default {
  name: 'IkTableNumberTag',
  props: {
    value: {
      type: Number,
      default: 0
    },
    precision: {
      type: Number,
      default: 2
    },
    errorSign: {
      type: Boolean,
      default: false
    },
    message: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      val: 0
    }
  }
}
</script>

<style lang="scss" >
.el-tag{
  margin-left: 10px;
}
</style>
